import { Map } from "immutable";

import * as actionTypes from "./constants";

const defaultState = Map({
    details: {},
    artiList: {},
    reportList: {},
    lookList: {}
});

function reducer(state = defaultState, action) {
    switch (action.type) {
        case actionTypes.GET_DETAILS:
            return state.set("details", action.details);
        case actionTypes.GET_ARTILIST:
            return state.set("artiList", action.artiList);
        case actionTypes.GET_REPORT:
            return state.set("reportList", action.reportList);
        case actionTypes.GET_LOOK:
            return state.set("lookList", action.lookList);
        default:
            return state
    }
}

export default reducer;
